package cn.czg.cms;

import cn.czg.cms.netty.NettyServer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication(scanBasePackages = {"cn.czg.cms"})
@MapperScan("cn.czg.cms.mapper")
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Bean
    public ApplicationRunner startNetty(NettyServer nettyServer) {
        return args -> nettyServer.start();
    }

}
